<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Register</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            background-color: #f4f4f4;
        }
        .register-container {
            width: 300px;
            margin: 100px auto;
            background-color: white;
            padding: 20px;
            border-radius: 5px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
        }
        h2 {
            text-align: center;
        }
        label {
            display: block;
            margin-bottom: 5px;
        }
        input[type="text"], input[type="password"] {
            width: 100%;
            padding: 10px;
            margin-bottom: 15px;
            border: 1px solid #ccc;
            border-radius: 3px;
        }
        input[type="submit"] {
            width: 100%;
            padding: 10px;
            background-color: #4CAF50;
            color: white;
            border: none;
            border-radius: 3px;
            cursor: pointer;
        }

        .bg {
            background-image: url('/images/超多菌2.png');
            height: 253px;
            display: flex;
            justify-content: center;
            align-items: center;
        }

        .bg h1 {
            color: white;
            font-size: 72px;
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
            letter-spacing: 10px;
        }

    </style>
</head>
<body>
<div class="bg">
    <h1>野生菌识别系统新用户注册</h1>
</div>
<div class="register-container">
    <h2>注册</h2>
    <form th:action="@{/register}" method="post">
        <label for="newUsername">新用户名:</label>
        <input type="text" id="newUsername" name="newUsername" required><br>
        <label for="newPassword">新密码:</label>
        <input type="password" id="newPassword" name="newPassword" required><br>
        <input type="submit" value="注册">
    </form>
    <p th:if="${error}" th:text="${error}"></p>
</div>
</body>
</html>